﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Site.Master" AutoEventWireup="true"
    CodeBehind="Details.aspx.cs" Inherits="_1041345_1041368_1041422_DoAnCuoiKy.Pages.Details" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script src="../Scripts/Lib/jquery_1.7.1.js" type="text/javascript"></script>
    <script type="text/javascript">        
        function LoadFeed() 
        {
            var a = window.location.href.toString().split('?');
            var b = a[1].split('=');
            $.ajax(
            {
                type: "GET",
                url: "http://localhost:9999/Service1.svc/GetFeed/" + b[1].toString(),
                dataType: "xml",
                success: function (xml) 
                {                    
                    $(xml).find("DataFeed_DTO").each(function () {
                        var str = "<tr><td align='center' width='30%'><u><a href=" + $(this).find("Link").text() + ">" + $(this).find("Title").text() + "</a></u></td><td align='left' width='70%'>" + $(this).find("Description").text() + "</td><tr>";
                        $(".detail").append(str);
                    });
                },
                error: function (jqXHR, textStatus, errorThrown) {
                    alert("Error Load Feed !!!" + textStatus + jqXHR + errorThrown);
                }
            });
        }
    </script>
    <table style="width: 100%;" class='detail' border='1' cellspacing='0' cellpadding='0'>            
        <tr>
            <td align="center" width="30%" bgcolor="pink"><b>Title</b></td>           
            <td align="center" width="70%" bgcolor="pink"><b>Description</b></td>            
        </tr>
    </table>
    
    <script type="text/javascript">
        LoadFeed();
    </script>
</asp:Content>
